﻿<% @title = "#{t :chitiet}" %>
<%@a = 0%>
<%@pro = Product.find(:all, :conditions => ['product_id = ?',"#{@borrowedtable.product_id}"])%>
<%@pro.each do |pro|%>
<%@a = pro.Status%>
<%end%>

    
<%if(@a >= 0)%>
<font size = '5'>
    <a color = "color"> <%= t :muonthanhcong%></a></br>
</font>
<font size = '5'>
<p>
		<b><%= t :nguoimuon%>:</b>
		<%= @borrowedtable.NameOfBorrow%>
</p>

<p>
		<b><%= t :tensach%>:</b>
		<%= @borrowedtable.NameOfDrink%>
</p>

<p>
		<b><%= t :ngaymuon%>:</b>
		<%= @borrowedtable.BorrowedDate%>
</p>

<p>
		<b><%= t :hantrasach%>:</b>
		<%= @borrowedtable.Deadline%>
</p>
</font>
<%else%>
<%@borrowedtable.destroy%>
<font size = '5'>
    <a color = "color"> Đăng kí Mượn Sách Thất Bại</a></br>
</font>
<font size = '4'>
    <p>Do tình trạng sách hiện tại là 0</p>
</font>

<%end%>

<font size = '4'>
<a href = "/borrowedtables/new"><%= t :quaylai%></a>
</font>
